package com.ruoyi.repairs.service.impl;

import com.ruoyi.repairs.domain.CrmRepairsRecord;
import com.ruoyi.repairs.mapper.CrmRepairsRecordMapper;
import com.ruoyi.repairs.service.ICrmRepairsRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 维修记录Service业务层处理
 * 
 * @author hct
 * @date 2022-02-11
 */
@Service
public class CrmRepairsRecordServiceImpl implements ICrmRepairsRecordService
{
    @Autowired
    private CrmRepairsRecordMapper crmRepairsRecordMapper;

    /**
     * 查询维修记录
     * 
     * @param id 维修记录主键
     * @return 维修记录
     */
    @Override
    public CrmRepairsRecord selectCrmRepairsRecordById(Long id)
    {
        return crmRepairsRecordMapper.selectCrmRepairsRecordById(id);
    }

    /**
     * 查询维修记录列表
     * 
     * @param crmRepairsRecord 维修记录
     * @return 维修记录
     */
    @Override
    public List<CrmRepairsRecord> selectCrmRepairsRecordList(CrmRepairsRecord crmRepairsRecord)
    {
        return crmRepairsRecordMapper.selectCrmRepairsRecordList(crmRepairsRecord);
    }

    /**
     * 新增维修记录
     * 
     * @param crmRepairsRecord 维修记录
     * @return 结果
     */
    @Override
    public int insertCrmRepairsRecord(CrmRepairsRecord crmRepairsRecord)
    {
        return crmRepairsRecordMapper.insertCrmRepairsRecord(crmRepairsRecord);
    }

    /**
     * 修改维修记录
     * 
     * @param crmRepairsRecord 维修记录
     * @return 结果
     */
    @Override
    public int updateCrmRepairsRecord(CrmRepairsRecord crmRepairsRecord)
    {
        return crmRepairsRecordMapper.updateCrmRepairsRecord(crmRepairsRecord);
    }

    /**
     * 批量删除维修记录
     * 
     * @param ids 需要删除的维修记录主键
     * @return 结果
     */
    @Override
    public int deleteCrmRepairsRecordByIds(Long[] ids)
    {
        return crmRepairsRecordMapper.deleteCrmRepairsRecordByIds(ids);
    }

    /**
     * 删除维修记录信息
     * 
     * @param id 维修记录主键
     * @return 结果
     */
    @Override
    public int deleteCrmRepairsRecordById(Long id)
    {
        return crmRepairsRecordMapper.deleteCrmRepairsRecordById(id);
    }
}
